import { IFeidaoAiBrowserComponent } from '@feidao/web/interfaces';
import set_node_cls from '@feidao/web/atom/browser/ui/set-node-cls';
import nodejs from '@feidao/web/atom/browser/msg/nodejs';
import render from '@feidao/web/atom/browser/render/render';
import P01 from './P01';

export default async function a003(fd: IFeidaoAiBrowserComponent, ...args: any[]) {
	// 获取数据，渲染
	const exam_id = args[0][0];
	fd.data.exam_id = exam_id;
	const data = await nodejs(fd.data.spaceid, 'exam_find', {
		criteria: { exam_id },
		page_no: 1,
		page_size: 1
	});
	render(fd, data.dataArray, P01, 'P01', 'inner');
	// 调用事件
	set_node_cls(fd.data.node, 'display-n', false);
}
